<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<script>
		var delcart = "{|U:'Cart/delCart'}";
		var upcart = "{|U:'Cart/updateGoods'}";
		//用于多选保存商品ID
				var goodsGid = [];
				<foreach from="$carts.goods" key="$kkk" value="$vvv">
					goodsGid.push('{$kkk}');
				</foreach>
				console.log(goodsGid);
	</script>
	<link rel="stylesheet" href="__VIEW__/css/shopcart.css" />
	<script type="text/javascript" src="__STATIC__/js/jquery-1.7.2.min.js"></script>
	<link rel="stylesheet" href="__STATIC__/css/hdjs.css" />
	<script type="text/javascript" src="__STATIC__/js/hdjs.min.js"></script>
	<script type="text/javascript" src="__VIEW__/js/carts.js"></script>
	<script>
	$(function(){
		$('#cartFrom').submit(function(){
			<if value="isset($hd['session']['uid'])">
				return true
				<else/>
				hd_alert({
					message:'请您先登陆再提交订单',
					timeout:3
				})
				return false;
			</if>
		})
		})
	</script>
	<title>购物车</title>
	
</head>
<body>
	<div id="content">
		<!--头部-->
		<include file="__VIEW__/Public/carthead.html" />
		<!--头部结束-->

		<!--主体部分-->
		<div id="cartContent">
			<!--当前位置面包屑-->
			<div class="location">
				<span class="onemyshopcart">1.我的购物车</span>
				<span class="onemyshopcart" style="color:#666;">2.填写核对信息单</span>
				<span class="onemyshopcart" style="color:#666;">3.成功提交订单</span>
			</div>
			<!--当前位置面包屑-->
			<!--购物车头部-->
			<div class="carTop">
				<span class="carIcon"></span>
				<h2>我的购物车</h2>
			</div>
			<!--温馨提示-->
			<div class="prompt">
				<div class="leftTitle">
					<span>温馨提示：</span>
					<span style="color:#666;">1.选购清单中的商品无法保留库存，请您及时结算。2.商品的价格和库存将以订单提交时为准。3.促销活动满减优惠将均摊至商品小计中。 </span>
				</div>
			</div>
			<!--购物车头部结束-->

			<!--购物车主体-->
			<div class="cartCenter">
				<!--表单头-->
				<table>

					<tr class="tabletitle">
						<th>
							<input type="checkbox" name="selectall" checked="checked" />
						</th>
						<th align="left">全选</th>
						<th></th>
						<th>商品名称</th>
						<th>尺寸 </th>
						<th>单价  </th>
						<th>数量</th>
						<th>优惠 </th>
						<th>小计 </th>
						<th>操作</th>
					</tr>
					<form action="{|U:'Cart/shopConfirm'}" id="cartFrom" method="post">
					<if value="!empty($carts.goods)">
					<foreach from="$carts.goods" key="$key" value="$val">
					<tr class="shopList" cartid="{$key}">
						<td></td>
						<td align="left"><input type="checkbox" checked="checked" name="selectPro[]" value="{$key}" /></td>
						<td width="52">
							<a href="__MODULE__/Details/index/gid/{$val.id}">
								<img src="__ROOT__/{$val.img}" alt="" width="48" height="48" />
							</a>
						</td>
						<td  style="margin-bottom:5px;">
							<a href="__MODULE__/Details/index/gid/{$val.id}" style="padding-left:5px;">{$val.name} {$val.options.combinestr.0}</a>
						</td>
						<td align="center">
							{$val.options.combinestr.1}
						</td>
						<td align="center" >
							￥{$val.price}
						</td>
						<td align="center" width="100">
							<a href="javascript:;" class="minus"></a>
							<input type="text" name="proNum"  value="{$val.num}" class="proNum" />
							<a href="javascript:;" class="plus"></a>
						</td>
						<td align="center">
							-
						</td>
						<td align="center" class="goodsCurrnetCountMoney">
							￥{$val.total}
						</td>
						<td align="center" valign="middle">
							<a href="" style="color:#444">收藏</a><br />
							<div class="msgDel">
								<p class="delTitle">您确定删除吗?</p>
								<p class="delBtns">
									<a href="javascript:;" class="del">删除</a>
									<a href="javascript:;" class="delcancl">取消</a>
								</p>
								<p class="dowarrow"></p>
							</div>
							<a href="javascript:;" class="delbox" style="color:#777;">删除</a>
						</td>
					</tr>
					</foreach>
					<else />
					<tr>
						<td colspan="10" height="50" style="font-size:20px;" align="center">购物车内还没有商品  <a href="{|U:'Index/index'}" style="color:red;">去购物吧^_^</a></td>
					</tr>
					</if>
					<tr class="nogoods" style="display: none;">
						<td colspan="10" height="50" style="font-size:20px;" align="center">购物车内还没有商品  <a href="{|U:'Index/index'}" style="color:red;">去购物吧^_^</a></td>
					</tr>
				</table>
				<if value="isset($carts)">
				<!--购物车按钮-->
				<div id="delCount">
					<div class="left">
						<label><input type="checkbox" checked="checked" id="checkall" /><span class="selectspan">全选</span></label>
							<div class="msgDel">
								<p class="delTitle">您确定删除吗?</p>
								<p class="delBtns">
									<a href="javascript:;" class="delb">删除</a>
									<a href="javascript:;" class="delcancl">取消</a>
								</p>
								<p class="dowarrow"></p>
							</div>
						<a href="javascript:;" id="delCartGoods" >删除</a>
						<div class="countNumFont">
							数量总计：<span class="numCount">{$carts.total_rows}件</span>
						</div>
						<div class="fontPrice">
							产品金额总计(不含运费)：
							<span>￥{$carts.total}</span>
						</div>
					</div>
					<div class="right">
						<a href="{|U:'Index/index'}" class="keepShop"><<继续购物</a>
						<!--<a href="{|U:'Cart/balance'}" class="goSum">去结算>></a>-->
						<input type="submit" class="goSum" value="去结算>>>"  />
					</div>
					</form>
				</div>
				</if>
			</div>
			<!--购物车主体-->

		</div>
		<!--主体部分结束-->
		<!--页脚-->
		<div id="foot">
			<div class="copyright">
				Copyright 2007 - 2015 vancl.com All Rights Reserved 京ICP证100557号 京公网安备11010102000579号 出版物经营许可证新出发京批字第直110138号
			</div>
			<div class="gsjImg">
				<a href="" ><img src="__VIEW__/img/cert-redlogo.png" alt="" /></a>
				<a href="" ><img src="__VIEW__/img/cert-costumeorg.gif" alt="" /></a>
				<a href="" ><img src="__VIEW__/img/cert-wsjybzzx.png" alt="" /></a>
			</div>
		</div>
		<!--页脚结束-->
	</div>

</body>
</html>
